/**
 * 
 */
package org.mhz.sit.controller;

import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;

import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Label;
import javafx.scene.control.TextArea;

import org.mhz.sit.util.AlertUtil;

/**
 * @author Mahan
 *
 * Alert Controller
 */
public class AlertController implements Initializable
{
    @FXML private TextArea alertMessageTextArea = new TextArea();
    
    /* (non-Javadoc)
     * @see javafx.fxml.Initializable#initialize(java.net.URL, java.util.ResourceBundle)
     */
    @Override
    public void initialize(URL aArg0, ResourceBundle aArg1)
    {
        alertMessageTextArea.setText(AlertUtil.getAlertMessage());
    }

    /**
     * Handle OK button click
     *
     * @param event - The event
     * @throws IOException
     */
    @FXML protected void handleOkButtonClick(ActionEvent event) throws IOException
    {       
        AlertUtil.getAlertStage().hide();
    }    
}
